/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

import React, { useEffect, useState } from 'react';
import PageHeaderLayout from '@/layouts/PageHeaderLayout';
import { isOldUser } from '@/services/automatic';
import CommonPart from './components/CommonPart';
import styles from './styles.less';

const GridConfiguration = () => {
  const [olderUser, setOlderUser] = useState(false);

  useEffect(() => {
    isOldUser().then(res => {
      setOlderUser(res);
    });
  }, []);

  return (
    <PageHeaderLayout title="格口配置">
      <div className={styles.main}>
        <CommonPart source="grid" isOldUser={olderUser} />
      </div>
    </PageHeaderLayout>
  );
};

export default React.memo(GridConfiguration);
